<!doctype html>
<html>

<head>
	<meta charset="utf-8">
	<% include  ./template/commonCss.ejs %>
	<link href="<%=resUrl%>/css/transport_collection.css" rel="stylesheet" type="text/css" />
	<% include ./template/commonJs.ejs %>
	<% include ./template/chatLister.ejs %>
</head>

<body ontouchstart> 
	<% var topTitle = '寄售管理';var topReturnType = '' %>
	<% include ./template/topReturn.ejs %>
	<div class="weui-tab">
		<div class="tabs" <%if(locals.token && token != ''){%>style="top:0;"<%}%>>
			<a class="item last current" href="javascript:" data-state="-1">
				全部藏品
				<div class="v-line"></div>
			</a>
			<a class="item last" href="javascript:" data-state="0" >
				待审核藏品
				<div class="v-line"></div>
			</a>
			<a class="item last" href="javascript:" data-state="30" >
				待官方售卖
				<div class="v-line"></div>
			</a>
		</div>
		<div id="aroundBox" <%if(locals.token && token != ''){%>style="top:1rem;"<%}%>>
			<div class="weui-pull-to-refresh__layer" style="padding: 5px;">
				<div class="weui-pull-to-refresh__arrow"></div>
				<div class="weui-pull-to-refresh__preloader"></div>
				<div class="down">下拉刷新</div>
				<div class="up">释放刷新</div>
				<div class="refresh">正在刷新</div>
			</div>
			<div id="contentTo" >
				<!-- content -->
			</div>
			<div class="weui-loadmore" id="loadmore">
				<i class="weui-loading"></i>
				<span class="weui-loadmore__tips">正在加载</span>
			</div>
			<div class="weui-loadmore weui-loadmore_line" style="display:none;" id="nomore">
				<span class="weui-loadmore__tips">全部加载完毕</span>
			</div>
			
		</div>
			
			
	</div>	
	<a href="javascript:visitUrl('/add_transport',true)">	
	<div class="add-bottom">我要寄售</div>	
	</a>
	<script id="content" type="text/html">
		{{each list}}
		<div class="shoplist-item">
			<div class="shoplist-item-top">	
				{{if $value.state == 0}}
				<div class="order-top-rig order-top-orange">待审核</div>
				{{else if $value.state == 1}}
				<div class="order-top-rig">审核失败</div>
				{{else if $value.state == 10}}
				<div class="order-top-rig order-top-orange">待发货</div>
				{{else if $value.state == 20}}
				<div class="order-top-rig order-top-orange">待验货</div>
				{{else if $value.state == 21}}
				<div class="order-top-rig order-top-orange">验货失败</div>
				{{else if $value.state == 22}}
				<div class="order-top-rig order-top-orange">退货已收货</div>
				{{else if $value.state == 30}}
				<div class="order-top-rig order-top-orange">验货成功</div>
				{{else if $value.state == 40}}
				<div class="order-top-rig">出售成功</div>
				{{else if $value.state == 99}}
				<div class="order-top-rig">交易关闭</div>
				{{/if}}
			</div>
			<div class="shoplist-item-body">
				<a  href="javascript:visitUrl('/transport_coll_detail?id={{$value.id}}',true)">
				<div class="order-body-let" style="background: url({{$value.coverImage}}?x-oss-process=image/resize,w_500) no-repeat 0 center;background-size: 100% auto;">
				</div>
				</a>	
				<a class="order-body-cen" href="javascript:visitUrl('/transport_coll_detail?id={{$value.id}}',true)">
					<div class="order-pro-name">{{$value.productName}}</div>
					<div class="auto-height"></div>
					<div class="order-img">期望收益：¥{{$value.productPrice}}</div>
				</a>	
				<div class="auto-height"></div>
				<div class="order-bottom" >
						{{if $value.state == 0}}
						<!-- 待审核 -->
						<div class="order-bots" onclick="cancelReceive('{{$value.id}}');">取消</div>
						{{else if $value.state == 1}}
						<!-- 审核失败 -->
						{{else if $value.state == 10}}
						<!-- 待发货 -->
						<div class="order-bots" onclick="logistics('{{$value.id}}','{{$value.sendDetail?$value.sendDetail.sendLogisticsCode:''}}','{{$value.sendDetail?$value.sendDetail.logisticsNo :''}}');">立即发货</div>
						{{else if $value.state == 20}}
						<!-- 待验货 -->
						<!-- <div class="order-bots" onclick="logistics('{{$value.id}}','{{$value.sendDetail?$value.sendDetail.logisticsCompany:""}}','{{$value.sendDetail?$value.sendDetail.logisticsNo:""}}');">{{$value.sendDetail?"修改":"填写"}}物流信息</div> -->
						{{else if $value.state == 21}}
						<!-- 验货失败 -->
						<div class="order-bots" onclick="returnDeliver('{{$value.id}}');">已收到货</div>
						{{else if $value.state == 22}}
						<!-- 退货已收货 -->
						{{else if $value.state == 30}}
						<!-- 验货成功 -->
						{{else if $value.state == 40}}
						<!-- 出售成功 -->
						{{else if $value.state == 99}}
						<!-- 交易关闭 -->
						{{/if}}
				</div>	
			</div>
		</div>
		{{/each}}
	</script>		
	<script type="text/javascript" src="<%=resUrl%>/js/transport_collection.js"></script>
</body>

</html>